using System;
using System.Collections.Generic;

using TnPlus.Entities.Utils;
using TnPlus.Entities.Models;
using TnPlus.DAL;
using TnPlus.Common;

namespace TnPlus.Biz
{
	public class CashTodayService
	{
		/// <summary>
		/// Saves a record to the CashToday table.
		/// </summary>
		public virtual void Insert(CashTodayInfo cashTodayInfo)
		{
			try
			{
				new CashTodayDAO().Insert(cashTodayInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CashToday - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the CashToday table.
		/// </summary>
		public virtual void Update(CashTodayInfo cashTodayInfo)
		{
			try
			{
				new CashTodayDAO().Update(cashTodayInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CashToday - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the CashToday table.
		/// </summary>
		public virtual void Delete(Guid? idCash)
		{
			try
			{
				new CashTodayDAO().Delete(idCash);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CashToday - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the CashToday table.
		/// </summary>
		public virtual CashTodayInfo Select(Guid? idCash)
		{
			try
			{
				return new CashTodayDAO().Select(idCash);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CashToday - Select", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the CashToday table.
		/// </summary>
		public List<CashTodayInfo> SelectAll()
		{
			try
			{
				return new CashTodayDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CashToday - SelectAll", ex);
				throw;
			}

		}

	}
}
